// Created by lifei on 2020/7/20--9:24.
<template>
  <div class="resource-manage">
    <div class="sort-tree box-shadow">
      <div class="searchInput">
        <el-input v-model="input" prefix-icon="el-icon-search" :placeholder="'请输入项目名称'" clearable @keyup.enter.native="search()"></el-input>
      </div>
      <project-tree :list="projectTree" @showChild="showChild" @initRightTable="initRightTable"></project-tree>
    </div>
    <div class="right-content">
      <div class="amount-wrap box-shadow">
        <div class="item all-center" v-for="(item,index) in roomStatus" :index="index" :key="index">
          <div class="value text-theme">{{formatterStatus(item.value)}}</div>
          <div class="label">{{item.label}}</div>
        </div>
      </div>
      <dataList
        class="box-dataList"
        placeholder="请输入物业名称"
        :pageInfo="pager"
        :listData="tableData"
        :selectData="selectionVals"
        searchName="propertyName"
        :menuList="['add',{test:'资产处置'},{test2:'拆分'},{test3:'合并'},'delete',{test4:'批量导入'},'export']"
        :filterList="filterList"
        :menuSpan="16"
        @menu-click="handleMenuClick"
        openSelection
      >
        <el-table :data="tableData" align="center" @selection-change="$event => (selectionVals = $event)">
          <el-table-column type="selection" width="55"></el-table-column>
          <el-table-column label="物业名称" prop="propertyName"></el-table-column>
          <el-table-column label="物业类型" prop="propertyType" :formatter="dictFormate"></el-table-column>
          <el-table-column label="物业用途" prop="useType" :formatter="dictFormate"></el-table-column>
          <el-table-column label="建筑面积(m²)" prop="buildingArea"></el-table-column>
          <el-table-column label="产权情况" prop="propertyOwnership" :formatter="dictFormate"></el-table-column>
          <el-table-column label="物业状态" prop="propertyStatus" :formatter="dictFormate"></el-table-column>
          <el-table-column label="物业来源" prop="propertySource" :formatter="dictFormate"></el-table-column>
          <el-table-column width="150px" label="操作">
            <template slot-scope="scope">
              <el-button v-if="scope.row.isVr == '1'" type="text">
                <a style="color: #409EFF" :href="scope.row.vrUrl" target="_blank">VR房源</a>
              </el-button>
              <el-button type="text" @click="toEdit(scope.row)">编辑</el-button>
              <el-button type="text" @click="toLook(scope.row)">查看</el-button>
            </template>
          </el-table-column>
        </el-table>
      </dataList>
    </div>

    <!--        资产处置-->
    <deal-room ref="dealRoom" @doDeal="doDeal"></deal-room>
    <!--        拆分物业-->
    <split-room ref="splitRoom" @doSplit="doSplit"></split-room>

    <merge-room ref="mergeRoom" v-if="mergeDestroy" @mergeRoomClose="mergeRoomClose" @doMerge="doMerge"></merge-room>

    <ocr-add ref="roomOcr"></ocr-add>
  </div>
</template>

<script src="./property_list.js"></script>
<style scoped lang="scss">
@import "property_list";
</style>

